<div class="layui-box layui-laypage layui-laypage-default">
    {% if page_obj.has_previous %}
        <a href="?page={{ page_obj.previous_page_number }}">上一页</a>
    {% else %}
        <a href="" class="layui-laypage-prev layui-disabled">上一页</a>
    {% endif %}

    {% for paginator_num in paginator.page_range %}
        {% if page_obj.number == paginator_num %}
            <span class="layui-laypage-curr">
                            <em class="layui-laypage-em"></em><em>{{ paginator_num }}</em>
                        </span>
        {% else %}
            <a href="?page={{ paginator_num }}">{{ paginator_num }}</a>
        {% endif %}
    {% endfor %}

    {% if page_obj.has_next %}
        <a href="?page={{ page_obj.next_page_number }}">下一页</a>
    {% else %}
        <a href="" class="layui-laypage-prev layui-disabled">下一页</a>
    {% endif %}
    <span class="layui-laypage-count">
                        第{{ page_obj.number }}页/共{{ paginator.num_pages }}页
                    </span>
</div>